<% title = component.present? ? translated_attribute(component.name) : t("decidim.components.meetings.name") %>
<% if local_assigns[:main_action] %>
  <h1 class="title-decorator"><%= title %></h1>
<% else %>
  <h2 class="title-decorator"><%= t("decidim.components.meetings.name") %></h2>
<% end %>

<% if allowed_to?(:create, :meeting) %>
  <%= action_authorized_link_to :create, new_meeting_path, permissions_holder: current_component, class: "button button__xl button__secondary w-full", data: { "redirect_url" => new_meeting_path } do %>
    <span><%= t("new_meeting", scope: "decidim.meetings.meetings.index") %></span>
    <%= icon "add-line" %>
  <% end %>
<% end %>

<%= render partial: "decidim/meetings/shared/filters", locals: {
      search_variable:,
      filter_options: filter_options || {}
    } %>
